using System;
using System.Drawing;
using System.Collections.Generic;
using System.Text;
using PH.Common;
using PH.Map;
using PH.Mission;

namespace Hoshimi.Base
{
    class MyAI : PH.Common.Player
    {
        #region static
     
        //Variables de clase. 

        List<Point> camino = new List<Point>();
        public bool flag = false;
        public static int logCasero = 10;
        #endregion

        #region Events

        public MyAI(string _name, int _id)
            : base(_name, _id)
        {
            //Handlers del InjectionPoint y WhatToDoNext
            this.ChooseInjectionPoint += new ChooseInjectionPointHandler(MyAI_ChooseInjectionPointEvent);
            this.WhatToDoNext += new WhatToDoNextHandler(MyAI_WhatToDoNextEvent);
        }


        void MyAI_WhatToDoNextEvent()
        {

            if (flag == false)
            {
                flag = true; 
                //Log.Items.Add("empiezo con el path");
                //camino =  PathFinder.GetPath(this,new Point(100, 100), new Point(100, 110), Tissue);
                //Log.Items.Add("termino con el path");


                foreach (Point punto in PathFinder.GetPath(this, new Point(100, 100), new Point(100, 90), Tissue))
                {                
                    Log.Items.Add("El pto es... " + Convert.ToString(punto));
                    //AI.MoveTo(PathFinder.GetPath(this, new Point(100, 100), new Point(100, 90), Tissue));
                }

            }
         }



        void MyAI_ChooseInjectionPointEvent()
        {
            //punto de inyeccion elejido.
            this.InjectionPointWanted = new Point(100, 100);            
        }
        #endregion
      
    }
}
